﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace System.Collections
{

    /// <summary>
    /// Provides the ability to check if an item matches the encapsulated
    /// critieria.
    /// </summary>
    public interface IPredicate
    {

        /// <summary>
        /// Filters an item using the encapsulated criteria.
        /// </summary>
        /// <param name="item">The item to filter.</param>
        /// <returns>true if the item matches; false otherwise.</returns>
        bool Filter(object item);
    }
}

namespace System.Collections.Generic
{

    /// <summary>
    /// Provides the ability to check if an item matches the encapsulated
    /// critieria.
    /// </summary>
    /// <typeparam name="T">The type of object that can be matched.</typeparam>
    public interface IPredicate<T>
    {

        /// <summary>
        /// Filters an item using the encapsulated criteria.
        /// </summary>
        /// <param name="item">The item to filter.</param>
        /// <returns>true if the item matches; false otherwise.</returns>
        bool Filter(T item);
    }
}
